3.117 \(\int \frac{c+d x^2+e x^4+f x^6}{a+b x^2} \, dx\)

Optimal. Leaf size=100 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{\sqrt{a} b^{7/2}}+\frac{x \left (a^2 f-a b e+b^2 d\right )}{b^3}+\frac{x^3 (b e-a f)}{3 b^2}+\frac{f x^5}{5 b} \]

[Out]

((b^2*d - a*b*e + a^2*f)*x)/b^3 + ((b*e - a*f)*x^3)/(3*b^2) + (f*x^5)/(5*b) + ((b^3*c - a*b^2*d + a^2*b*e - a^
3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

________________________________________________________________________________________

Rubi [A]  time = 0.0615987, antiderivative size = 100, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 27, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.074, Rules used = {1810, 205} \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{\sqrt{a} b^{7/2}}+\frac{x \left (a^2 f-a b e+b^2 d\right )}{b^3}+\frac{x^3 (b e-a f)}{3 b^2}+\frac{f x^5}{5 b} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

((b^2*d - a*b*e + a^2*f)*x)/b^3 + ((b*e - a*f)*x^3)/(3*b^2) + (f*x^5)/(5*b) + ((b^3*c - a*b^2*d + a^2*b*e - a^
3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

Rule 1810

Int[(Pq_)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[Pq*(a + b*x^2)^p, x], x] /; FreeQ[{a,
b}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{c+d x^2+e x^4+f x^6}{a+b x^2} \, dx &=\int \left (\frac{b^2 d-a b e+a^2 f}{b^3}+\frac{(b e-a f) x^2}{b^2}+\frac{f x^4}{b}+\frac{b^3 c-a b^2 d+a^2 b e-a^3 f}{b^3 \left (a+b x^2\right )}\right ) \, dx\\ &=\frac{\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac{(b e-a f) x^3}{3 b^2}+\frac{f x^5}{5 b}+\frac{\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \int \frac{1}{a+b x^2} \, dx}{b^3}\\ &=\frac{\left (b^2 d-a b e+a^2 f\right ) x}{b^3}+\frac{(b e-a f) x^3}{3 b^2}+\frac{f x^5}{5 b}+\frac{\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{\sqrt{a} b^{7/2}}\\ \end{align*}

Mathematica [A]  time = 0.0799274, size = 98, normalized size = 0.98 \[ \frac{\tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{\sqrt{a} b^{7/2}}+\frac{x \left (15 a^2 f-5 a b \left (3 e+f x^2\right )+b^2 \left (15 d+5 e x^2+3 f x^4\right )\right )}{15 b^3} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*x^2 + e*x^4 + f*x^6)/(a + b*x^2),x]

[Out]

(x*(15*a^2*f - 5*a*b*(3*e + f*x^2) + b^2*(15*d + 5*e*x^2 + 3*f*x^4)))/(15*b^3) + ((b^3*c - a*b^2*d + a^2*b*e -
 a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/(Sqrt[a]*b^(7/2))

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 135, normalized size = 1.4 \begin{align*}{\frac{f{x}^{5}}{5\,b}}-{\frac{a{x}^{3}f}{3\,{b}^{2}}}+{\frac{{x}^{3}e}{3\,b}}+{\frac{{a}^{2}fx}{{b}^{3}}}-{\frac{aex}{{b}^{2}}}+{\frac{dx}{b}}-{\frac{{a}^{3}f}{{b}^{3}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{2}e}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{ad}{b}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{c\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x)

[Out]

1/5*f*x^5/b-1/3/b^2*x^3*a*f+1/3/b*x^3*e+1/b^3*a^2*f*x-1/b^2*a*e*x+1/b*d*x-1/b^3/(a*b)^(1/2)*arctan(b*x/(a*b)^(
1/2))*a^3*f+1/b^2/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))*a^2*e-1/b/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))*a*d+1/(a*b
)^(1/2)*arctan(b*x/(a*b)^(1/2))*c

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.50391, size = 505, normalized size = 5.05 \begin{align*} \left [\frac{6 \, a b^{3} f x^{5} + 10 \,{\left (a b^{3} e - a^{2} b^{2} f\right )} x^{3} + 15 \,{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt{-a b} \log \left (\frac{b x^{2} + 2 \, \sqrt{-a b} x - a}{b x^{2} + a}\right ) + 30 \,{\left (a b^{3} d - a^{2} b^{2} e + a^{3} b f\right )} x}{30 \, a b^{4}}, \frac{3 \, a b^{3} f x^{5} + 5 \,{\left (a b^{3} e - a^{2} b^{2} f\right )} x^{3} + 15 \,{\left (b^{3} c - a b^{2} d + a^{2} b e - a^{3} f\right )} \sqrt{a b} \arctan \left (\frac{\sqrt{a b} x}{a}\right ) + 15 \,{\left (a b^{3} d - a^{2} b^{2} e + a^{3} b f\right )} x}{15 \, a b^{4}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/30*(6*a*b^3*f*x^5 + 10*(a*b^3*e - a^2*b^2*f)*x^3 + 15*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*sqrt(-a*b)*log((b
*x^2 + 2*sqrt(-a*b)*x - a)/(b*x^2 + a)) + 30*(a*b^3*d - a^2*b^2*e + a^3*b*f)*x)/(a*b^4), 1/15*(3*a*b^3*f*x^5 +
 5*(a*b^3*e - a^2*b^2*f)*x^3 + 15*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*sqrt(a*b)*arctan(sqrt(a*b)*x/a) + 15*(a*
b^3*d - a^2*b^2*e + a^3*b*f)*x)/(a*b^4)]

________________________________________________________________________________________

Sympy [A]  time = 0.926852, size = 158, normalized size = 1.58 \begin{align*} \frac{\sqrt{- \frac{1}{a b^{7}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log{\left (- a b^{3} \sqrt{- \frac{1}{a b^{7}}} + x \right )}}{2} - \frac{\sqrt{- \frac{1}{a b^{7}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log{\left (a b^{3} \sqrt{- \frac{1}{a b^{7}}} + x \right )}}{2} + \frac{f x^{5}}{5 b} - \frac{x^{3} \left (a f - b e\right )}{3 b^{2}} + \frac{x \left (a^{2} f - a b e + b^{2} d\right )}{b^{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x**6+e*x**4+d*x**2+c)/(b*x**2+a),x)

[Out]

sqrt(-1/(a*b**7))*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)*log(-a*b**3*sqrt(-1/(a*b**7)) + x)/2 - sqrt(-1/(a*b*
*7))*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)*log(a*b**3*sqrt(-1/(a*b**7)) + x)/2 + f*x**5/(5*b) - x**3*(a*f -
b*e)/(3*b**2) + x*(a**2*f - a*b*e + b**2*d)/b**3

________________________________________________________________________________________

Giac [A]  time = 1.14538, size = 143, normalized size = 1.43 \begin{align*} \frac{{\left (b^{3} c - a b^{2} d - a^{3} f + a^{2} b e\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{3}} + \frac{3 \, b^{4} f x^{5} - 5 \, a b^{3} f x^{3} + 5 \, b^{4} x^{3} e + 15 \, b^{4} d x + 15 \, a^{2} b^{2} f x - 15 \, a b^{3} x e}{15 \, b^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="giac")

[Out]

(b^3*c - a*b^2*d - a^3*f + a^2*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^3) + 1/15*(3*b^4*f*x^5 - 5*a*b^3*f*x^3
+ 5*b^4*x^3*e + 15*b^4*d*x + 15*a^2*b^2*f*x - 15*a*b^3*x*e)/b^5